// 年级学情-左侧导航
export const GRADE_TABS = [
  {
    desc: '学情总览',
    name: 'overview',
    key: 'overview',
    children: [
      {
        desc: '学情总结',
        name: 'summary',
        key: 'summary'
      },
      {
        desc: '班级综合对比',
        name: 'comparison',
        key: 'comparison'
      }
    ]
  },
  {
    desc: '作业分析',
    name: 'homeworkAnalysis',
    key: 'homeworkAnalysis',
    children: [
      {
        desc: '知识点分析',
        name: 'keyPoint',
        key: 'keyPoint'
      },
      {
        desc: '共性错题',
        name: 'commonMistakes',
        key: 'commonMistakes'
      },
      {
        desc: '教学质量分析',
        name: 'teachingQuality',
        key: 'teachingQuality'
      }
    ]
  },
  {
    desc: '学生分析',
    name: 'studentAnalysis',
    key: 'studentAnalysis',
    children: [
      {
        desc: '等级分布',
        name: 'gradeDistribution',
        key: 'gradeDistribution'
      }
    ]
  }
]

// 班级学情-左侧导航
export const CLASS_TABS = [
  {
    desc: '学情总览',
    name: 'overview',
    key: 'overview',
    children: [
      {
        desc: '学情总结',
        name: 'summary',
        key: 'summary'
      },
      {
        desc: '成绩趋势',
        name: 'resultTrends',
        key: 'resultTrends'
      }
    ]
  },
  {
    desc: '作业分析',
    name: 'homeworkAnalysis',
    key: 'homeworkAnalysis',
    children: [
      {
        desc: '知识点分析',
        name: 'keyPoint',
        key: 'keyPoint'
      },
      {
        desc: '共性错题',
        name: 'commonMistakes',
        key: 'commonMistakes'
      },
      {
        desc: '核心素养',
        name: 'coreCompetencies',
        key: 'coreCompetencies'
      },
      {
        desc: '教学质量分析',
        name: 'teachingQuality',
        key: 'teachingQuality'
      }
    ]
  },
  {
    desc: '学生分析',
    name: 'studentAnalysis',
    key: 'studentAnalysis',
    children: [
      {
        desc: '等级分布',
        name: 'gradeDistribution',
        key: 'gradeDistribution'
      },
      {
        desc: '学生表现',
        name: 'studentPerformance',
        key: 'studentPerformance'
      }
    ]
  }
]

// 年级学情-班级综合对比
export const COMPARISON_COLUMN = [
  {
    title: '班级',
    dataIndex: 'class_name',
    align: 'center',
    key: 'class_name'
  },
  {
    title: '任课老师',
    dataIndex: 'teacher_name',
    align: 'center',
    key: 'teacher_name'
  },
  {
    title: '布置次数',
    dataIndex: 'homework_count',
    align: 'center',
    key: 'homework_count',
    sorter: (a, b) => a.homework_count - b.homework_count
  },
  {
    title: '提交率',
    dataIndex: 'commit_rate',
    key: 'commit_rate',
    align: 'center',
    sorter: (a, b) => a.commit_rate - b.commit_rate
  },
  {
    title: '正确率',
    dataIndex: 'right_rate',
    key: 'right_rate',
    align: 'center',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '人均题数',
    dataIndex: 'mean_question_count',
    key: 'mean_question_count',
    align: 'center',
    sorter: (a, b) => a.mean_question_count - b.mean_question_count
  },
  {
    title: '平均时长',
    dataIndex: 'mean_time',
    key: 'mean_time',
    align: 'center',
    sorter: (a, b) => a.mean_time - b.mean_time
  }
]

// 年级学情/班级学情-知识点分析
export const KNOWLEDGE_COLUMN = [
  {
    title: '知识点名称',
    dataIndex: 'knowledge_name',
    className: 'knowledge-name',
    key: 'knowledge_name',
    align: 'center'
  },
  {
    title: '题目数',
    dataIndex: 'question_count',
    key: 'question_count',
    align: 'center'
  },
  {
    title: '正确率',
    align: 'center',
    dataIndex: 'right_rate',
    key: 'right_rate',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '未掌握学生数',
    align: 'center',
    dataIndex: 'student_count',
    key: 'student_count',
    sorter: (a, b) => a.student_count - b.student_count
  }
]

// 年级学情/班级学情-共性错题
export const COMMON_MISTAKES_COLUMN = [
  {
    title: '章节',
    align: 'center',
    dataIndex: 'section_name',
    key: 'section_name'
  },
  {
    title: '共性错题数',
    align: 'center',
    dataIndex: 'wrong_count',
    key: 'wrong_count'
  },
  {
    title: '共性错题平均正确率',
    align: 'center',
    dataIndex: 'mean_score_right',
    key: 'mean_score_right',
    sorter: (a, b) => a.mean_score_right - b.mean_score_right
  }
]

// 年级学情-教学质量分析
export const TEACHING_QUALITY_COLUMN = [
  {
    title: '校本练习',
    align: 'center',
    dataIndex: 'practice',
    key: 'practice'
  },
  {
    title: '年级平均',
    align: 'center',
    dataIndex: 'avg',
    key: 'avg'
  },
  {
    title: '1班',
    align: 'center',
    dataIndex: 'first',
    key: 'first',
    sorter: true
  }
]

// 班级学情-成绩趋势
export const GRADE_TRENDS = [
  {
    title: '任务名称',
    key: 'homework_name',
    align: 'center',
    dataIndex: 'homework_name'
  },
  {
    title: '题数',
    key: 'question_count',
    align: 'center',
    dataIndex: 'question_count'
  },
  {
    title: '提交率',
    dataIndex: 'submit_rate',
    align: 'center',
    key: 'submit_rate',
    sorter: (a, b) => a.submit_rate - b.submit_rate
  },
  {
    title: '正确率',
    dataIndex: 'right_rate',
    align: 'center',
    key: 'right_rate',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '平均时长',
    dataIndex: 'mean_time',
    key: 'mean_time',
    align: 'center',
    sorter: (a, b) => a.mean_time - b.mean_time
  },
  {
    title: '布置时间',
    dataIndex: 'create_at',
    align: 'center',
    key: 'create_at',
    sorter: (a, b) => a.create_at - b.create_at
  }
  // {
  //   title: '操作',
  //   key: 'operation',
  //   align: 'center',
  //   dataIndex: 'operation',
  //   width: 60
  // }
]

// 班级学情-学生表现
export const PERFORMANCE_COLUMN = [
  {
    title: '学生姓名',
    dataIndex: 'student_name',
    align: 'center',
    key: 'student_name'
  },
  {
    title: '等级',
    dataIndex: 'level',
    align: 'center',
    key: 'level',
    sorter: (a, b) => a.level - b.level
  },
  {
    title: '班次',
    dataIndex: 'student_index',
    align: 'center',
    key: 'student_index',
    sorter: (a, b) => a.student_index - b.student_index
  },
  {
    title: '提交率',
    dataIndex: 'submit_rate',
    align: 'center',
    key: 'submit_rate',
    sorter: (a, b) => a.submit_rate - b.submit_rate
  },
  {
    title: '正确率',
    dataIndex: 'right_rate',
    align: 'center',
    key: 'right_rate',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '作答题次',
    dataIndex: 'question_count',
    align: 'center',
    key: 'question_count',
    sorter: (a, b) => a.question_count - b.question_count
  },
  {
    title: '错误题数',
    dataIndex: 'wrong_count',
    align: 'center',
    key: 'wrong_count',
    sorter: (a, b) => a.wrong_count - b.wrong_count
  }
]

// 班级学情-教学质量分析
export const CLASS_TEACHING_QUALITY = [
  {
    title: '校本练习册',
    align: 'center',
    dataIndex: 'practice',
    key: 'practice',
    children: [
      {
        title: '新课标消暑形成性自主评价五下',
        align: 'center',
        dataIndex: 'chapter',
        key: 'chapter'
      }
    ]
  },
  {
    title: '人均题量',
    align: 'center',
    dataIndex: 'avg',
    key: 'avg',
    children: [
      {
        title: '班级',
        dataIndex: 'num_class_name',
        align: 'center',
        key: 'num_class_name'
      },
      {
        title: '年级平均',
        align: 'center',
        dataIndex: 'num_avg',
        key: 'num_avg'
      }
    ]
  },
  {
    title: '正确率',
    dataIndex: 'right_rate',
    align: 'center',
    key: 'right_rate',
    children: [
      {
        title: '班级',
        dataIndex: 'right_class_name',
        align: 'center',
        key: 'right_class_name'
      },
      {
        title: '年级平均',
        dataIndex: 'right_class_name',
        align: 'center',
        key: 'right_class_name'
      }
    ]
  }
]

// 学生学情-知识点分析
export const STUDENT_KNOWLEDGE_POINT = [
  {
    title: '知识点',
    dataIndex: 'knowledge_name',
    align: 'center',
    key: 'knowledge_name'
  },
  {
    title: '作答题次',
    dataIndex: 'question_count',
    align: 'center',
    key: 'question_count',
    sorter: (a, b) => a.question_count - b.question_count
  },
  {
    title: '错误题次',
    dataIndex: 'wrong_count',
    align: 'center',
    key: 'wrong_count',
    sorter: (a, b) => a.wrong_count - b.wrong_count
  },
  {
    title: '学生正确率',
    align: 'center',
    dataIndex: 'right_rate',
    key: 'right_rate',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '班级正确率',
    dataIndex: 'class_right_rate',
    align: 'center',
    key: 'class_right_rate',
    sorter: (a, b) => a.class_right_rate - b.class_right_rate
  }
]

// 学生学情-作业趋势
export const STUDENT_HOMEWORK_TRENDS = [
  {
    title: '任务名称',
    align: 'center',
    dataIndex: 'homework_title',
    key: 'homework_title'
  },
  {
    title: '题数',
    dataIndex: 'question_count',
    align: 'center',
    key: 'question_count'
  },
  {
    title: '正确率',
    dataIndex: 'right_rate',
    align: 'center',
    key: 'right_rate',
    sorter: (a, b) => a.right_rate - b.right_rate
  },
  {
    title: '布置时间',
    dataIndex: 'release_time',
    align: 'center',
    key: 'release_time',
    sorter: (a, b) => a.release_time - b.release_time
  },
  {
    title: '采集时间',
    dataIndex: 'submit_time',
    align: 'center',
    key: 'submit_time',
    sorter: (a, b) => a.submit_time - b.submit_time
  }
  // {
  //   title: '操作',
  //   dataIndex: 'operation',
  //   align: 'center',
  //   key: 'operation'
  // }
]
